package Interfata;



import java.util.HashSet;


public class Multime {
	
	@SuppressWarnings("rawtypes")
	private HashSet a = new HashSet();
	
	//adauga elem
	@SuppressWarnings("unchecked")
	public void adauga(int elem) 
	{
		a.add(elem);
	}
	//elimina elem
	public void sterge(int elem) 
	{
		a.remove(elem);
	}
	public int nrElem()
	{
		return a.size();
		
	}
	public void afis()
	{
		System.out.print(a);
		System.out.println();
	}
	
	
	@SuppressWarnings("unchecked")
	public void reuniune(Multime m)
	{
		//scaotem cate un elem din a si punem in m cu ajutorul lui adauga
		a.addAll(m.a);
	}
	
	
}

